(function () {
  // 获取所有需要的 DOM节点 和 数据
  var listData = JSON.parse(document.getElementById('J_data').innerHTML),
    tpl = document.getElementById('J_tpl').innerHTML,
    oSearchInput = document.getElementById('J_kw'),
    oPage = document.getElementsByClassName('J_page')[0]

  var init = function () {
    bindEvent()
  }

  function bindEvent() {
    oSearchInput.addEventListener('click', searchList, false)
  }

  function renderList(data, tpl) {
    var dataLen = data.length,
      list = ''

    if (data && dataLen > 0) {
      data.forEach((val, index, array) => {
        list += tpl.replace(function (node, key) {
          return {
            classes: val.classes,
            cource: val.course,
            img: val.img,
            teacher: val.teacher
          }[key]
        })
      });
    }
  }

  function searchList() {

  }

  init()
}())